package com.wtwd.campus.service;

import com.wtwd.campus.entity.LocationInfo;
import com.wtwd.campus.model.dto.LbsDTO;
import com.wtwd.campus.model.dto.WifiDTO;
import com.wtwd.campus.utils.Vizhi.entity.Cellular;
import com.wtwd.campus.utils.Vizhi.entity.Wifi;

import java.util.List;

/**
 * 此接口提供定位缓存
 */
public interface OrientationCacheService {

    int LBS_WIFI_DISTANCE = 5 * 1000;

    int POSITIONING_ACCURACY=3000;

    LocationInfo getLocation(String deviceNo, List<LbsDTO> lbs, List<WifiDTO> wifis);


    /**
     * wifi 命中处理
     *
     * @param wifis
     * @param locationByWifi
     * @return
     */
    LocationInfo processingHitWifi(List<WifiDTO> wifis, LocationInfo locationByWifi);

    /**
     * 获取定位换窜数据
     * @param imei
     * @param wifiList
     * @param cellulars
     * @return
     */
    LocationInfo getCacheLocation(String imei, List<Wifi> wifiList, List<Cellular> cellulars);

    /**
     *
     * @param cellulars  lbs 信息
     * @param wifiList  wifi 信息
     * @param imei
     * @param longitude
     * @param latitude
     * @param dataSourceType
     * @param accuracy
     * @Param address
     * @return
     *
     * 为了方便 且不改动项目原有代码 缓存定位存储的为 数据源返回坐标系 gcj02  故 所有定位缓存 存储坐标为gcj02
     */
    boolean saveCacheLocation(List<Cellular> cellulars, List<Wifi> wifiList, String imei, double longitude, double latitude, String dataSourceType, float accuracy,String address);

}
